using UnityEngine;

namespace Fusion.Utilities
{
    public class Utility
    {
        public static T Find<T>(GameObject gameObject, string path) where T : Component
        {
            Transform childTransform = gameObject.transform.Find(path);
            return childTransform?.GetComponent<T>();
        }
        public static GameObject Find(GameObject gameObject, string path)
        {
            Transform childTransform = gameObject.transform.Find(path);
            return childTransform?.gameObject;
        }
    }
}
